home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1996 June
/
EnigmA AMIGA RUN 08 (1996)(G.R. Edizioni)(IT)[!][issue 1996-06][EARSAN CD VII].iso
/
earcd
/
utmisc2
/
pchstfnc.lha
/
patchsetfunc
/
PatchSetFunc.doc
< prev
next >
Wrap
Text File
|
1996-03-29
|
6KB
|
175 lines
Documentation of PatchSetFunc V1.22
1. MOTIVATION
-------------
This one was written as a support program, for my patch.library. It patches the
exec.library/SetFunction() to use patch.library instead of the normal
OS-function.
Although I'm aware that there exist a couple of programs, which perform the same
task quite well (e.g.: SetManager by Nicola Salmoria, SaferPatches by Martin
Adrian), I thought it would be nice, if more programs could use my
patch.library.
2. WHAT IT DOES
---------------
If you're not expert with the Amiga operating system, all you need to know about
PatchSetFunc is that it will, under certain circumstances, avoid GURUs.
If you're an expert, here come the details. There's a function in exec.library,
whose name is SetFunction(). You know that Amiga libraries contain a 'jump
table', where the address of every function in the library is stored. Library
functions are always executed via the jump table, and NEVER through absolute
addressing. SetFunction() allows the user to modify the jump table, in order to
insert a custom routine in place of the standard one. For example, one could
modify the DisplayBeep() vector to play a sound instead of flashing the screen.
SetFunction() is a very useful feature of the Amiga operating system, but it has
the major drawback that there's no system supervising of concurrent use of the
same vector by different tasks. Under certain circumstances, that can be
deadly. Before removing its custom vector, a program should check that it was
not modified again. However, very few do that, and so if you do not terminate
such program in REVERSE order of when you executed them, you'll probably get a
system crash.
Another fault of Kickstart 1.x is that the dos.library vectors cannot be
modified by SetFunction(), because they do not follow the conventions
established by Commodore itself.
All this could be fixed if all programmers would use the patch.library.
Unfortunately patch.library is quite new and many programs still use
SetFunction().
So I wrote PatchSetFunc, which allows any program to take profit from
patch.library.
3. SYSTEM REQUIREMENTS
----------------------
- Any Amiga with any Kickstart version
- patch.library v4+ must be installed in libs:
4. INSTALLATION
---------------
The program 'PatchSetFunc' should be executed as the first command
in the startup-sequence after the SetPatch command.
You must specify the full path, if you place the command in a directory
other than c:.
You may also want to redirect the output to nil:.
The patch.library should be copied to LIBS:.
5. NOTES & WARNINGS & KNOWN BUGS
--------------------------------
- Programs directly reading addresses from the jump-table, may fail to quit!
(This behavior is illegal and not supported by Commodore!)
- In order to make patch.library to work with XOper a kludge has been
added, which stops PatchSetFunc the exec.library/Switch() function
(which in fact does the actual multitasking in the Amiga) of being patched
- Some programs patch the Expunge() function of a library, to ensure that the
library won't get expunged, while a patch is active.
If the support program PatchSupervisor is active PatchSetFunc ignores
patches to the Expunge() function.
- Programmers should use patch.library directly to ensure maximum safety, when
patching library functions
- A developer package with full documentation and includes is available on
Aminet (util/libs/PatchLibV4.lha)
- This software will show its full capabilities once the preferences editor
for the patch.library is available in the near future.
Programs can be excluded from using PatchSetFunc....
6. COMPATIBILITY
----------------
In general PatchSetFunc should work together with all programs, that know about
SetManager, because for these programs it will look like SetManager was active.
(The public messageport 'SetMan' can be found via FindPort())
Other programs should be configured (if possible), not to check, if a patch was
installed after its patch.
Program: Change when using PatchSetFunc:
XOper V2.x turn SmartPatch OFF
7. HISTORY
----------
V1.22 FIX: No longer patches the exec.library private functions Schedule() and
ExitIntr(). This caused ShapeShifter to crash on exit.
V1.21 ENHANCEMENT: Now supports project management of patch.library V4
V1.10 ENHANCEMENT: Now uses less stack
V1.06 FIX: The public message port was spelled 'Setman' instead of 'SetMan'
V1.02 RELEASE:First public release
8. LICENSE
----------
This material is © Copyright 1993-96 by Stefan Fuchs. All rights reserved.
It may be distributed freely as long as the following restrictions are met:
- The distributor may charge a fee to recover distribution costs.
The fee for diskette distribution should not be more than
the cost to obtain the same diskette from Fred Fish.
- The distributor agrees to cease distributing the programs and
data involved if requested to do so by the author.
- You may copy and distribute verbatim copies of the program's
executable code and documentation as you receive it, in any
medium, provided that you conspicuously and appropriately
publish only the original, unmodified program, with all
copyright notices and disclaimers of warranty intact and
including all the accompanying documentation, example files and
anything else that came with the original.
- If you are interested in including any of this material in a commercial
product, you should contact the author for his permission.
- The author will not be liable for any damage arising from the
failure of the programs or the library to perform as described,
or any destruction of other programs using the library residing
on a system. While I know of no damaging errors, the user of this
package uses it at his or her own risk.
This package may be distributed in PD-series (e.g.: the Fred Fish library) or
on the Aminet.
9. CONTACT
----------
To contact the author for bugreports, hints, ideas, donations, ....
write to:
Stefan Fuchs E-Mail: snfuchs@sokrates.franken.de
Oskar-von-Miller-Str. 49 Fido: Stefan Fuchs@2:2490/1901
D - 90478 Nuernberg
GERMANY